﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xzen.Images.Provider
{
    public class Storage
    {
        public string Name{get;set;}
        public string Uri { get; set; }
        public DateTime Created { get; set; }
        public DateTime Updated { get; set; }
        public string  User { get; set; }
        public virtual string FullName { 
            get { return Uri; } 
            set { Uri = value; } 
        }
        protected Storage()
        {
            Created = DateTime.UtcNow;
            Updated = DateTime.UtcNow;
        }
    }
    public class File: Storage
    {
        public File()
        {
        }
        public string ParentUri { get; set; }
        public Folder Parent { get; set; }
        public string MimeType { get; set; }
        public byte[] Data { get; set; }
    }
    public class Folder : Storage
    {
        public Folder()
        {
            Files = new List<File>();
            Folders = new List<Folder>();
        }
        public Folder Parent { get; set; }
        List<File> Files;
        List<Folder> Folders;
    }
}
